An amazing new project

Author
Modified

5/06/2024

Here are all the packages I’ve ever loaded in R, and some global settings.

Code
# ═══ Packages ═══════════════════
# librarian for package management
if (!require(librarian)) install.packages(librarian)
library(librarian)

# shelf checks installation, installs if need be, and loads the packages
shelf(
  # ─── data management ───
  readxl,         # importing xlsx
  openxlsx,       # exporting xlsx
  jsonlite,       # reading json
  fs,             # listing files
  
  # ─── modelling ───
  
  # frequentist modelling
  DirichletReg, # Dirichlet regression
  lme4,         # mixed models
  mgcv,         # non-linear general additive models
  
  # bayesian modelling
  brms,
  rstanarm,
  BayesFactor,
  tidybayes,
  
  # general modelling utility
  emmeans,   # marginal estimates
  
  # simulation
  simr, # power analysis by simulation
  holodeck,  # simulating multivariate data
  
  # machine learning
  cluster,        # cluster analyses
  mclust,         # mixture clustering
  FactoMineR,     # multivariate analyses
  
  # tidymodels framework and co - see https://www.tidymodels.org/
  infer,          # inferential analyses
  corrr,          # correlational analyses
  bayesian,       # brms x tidymodels
  multilevelmod,  # lmer x tidymodels
  tidymodels,     # modelling ecosystem
  
  # ─── visualisation ───
  
  # geoms and special plots
  factoextra,            # multivariate data plots
  ricardo-bion/ggradar,  # radar plots
  ggbeeswarm,            # scatter violin plots
  GGally,         # complex plots
  mgcViz,         # visualizing mgcv gams
  gratia,         # same 
  ggdendro,       # dendrograms
  seriation,      # dissimilarity plots
  
  # palettes
  scales,         # scale manipulation
  ggsci,          # scientific palettes
  viridis,        # colour-blind friendly palettes
  wesanderson,    # artistic palettes
  
  # layout and options
  patchwork, # ggplots layout
  ggpubr,         # publication plots
  rstatix,        # ggplot stat tools
  latex2exp, # cool LaTeX expressions on plots
  
  # interactive plots
  plotly,    # many options
  rgl,       # 3D plots
  
  # art packages - see the amazing tutorials by Danielle Navarro: 
  #                https://art-from-code.netlify.app/)
  
  gganimate,
  ggforce,
  ggtext,
  ggridges,
  hrbrthemes,
  showtext,
  showtextdb,
  ggdist,
  ggrepel,
  ggpattern,
  ggpointdensity,
  ggthemes,
  see, # already in easystats, see at the end
  ambient,
  camcorder,
  
  # ─── general ───
  
  reticulate, # interface between R and Python
  knitr,      # report generation options
  
  # rendering utility
  webshot,  # takes screenshots of HTML figures for Word render
  webshot2,
  
  # parallel processing
  parallel,
  doParallel,
  
  # my reference ecosystems
  easystats,
  tidyverse
)

# ─── Global cosmetic theme ───────────
theme_set(theme_modern(base_size = 14))

# setting my favourite palettes as ggplot2 defaults
options( 
  ggplot2.discrete.colour   = scale_colour_okabeito,
  ggplot2.discrete.fill     = scale_fill_okabeito,
  ggplot2.continuous.colour = scale_colour_viridis_c,
  ggplot2.continuous.fill   = scale_fill_viridis_c
)

# changing geom defaults if need be 
update_geom_defaults("text", list(size = 2.5, family = "serif"))

# ─── Extended color palettes ───

# custom 8-colour Okabe-Ito, which has only 7 main normally
pal_okabe_ito <- c(                                                  
  "#E69F00", "#56B4E9", "#009E73",                            
  "#F5C710", "#0072B2", "#D55E00", "#CC79A7", "#6c0009")      

# custom 9-colours Okabe-Ito
pal_okabe_ito_extended <- c(                                 
  "#E69F00", "#56B4E9", "#009E73",                           
  "#F5C710", "#0072B2", "#D55E00", "#CC79A7", "#6c0009", "#414487FF")

# Crazy 30-colour palette I created at some point
cool_30_colors <- c(                                                   
  "#3d51b4", "#414487FF", "#003d73", "#440154FF", "#6c0009", "#b64e4e",
  "#D55E00", "#E69F00", "#F5C710", "#FDE725FF", "#f2bb7b", "#f1afad", "#CC79A7", 
  "#e57774", "#7AD151FF", "#57b571", "#318a4a", "#009E73", "#22A884FF", 
  "#2A788EFF", "#0072B2", "#2da6b5", "#56B4E9", "#889be0", "#6677e0",   
  "#3d51b4", "#414487FF", "#003d73", "#440154FF", "#6c0009", "#b64e4e"    
  )   

# ─── Fixing a seed for reproducibility ───
set.seed(14051998)

# ─── Adding all package citations ───
knitr::write_bib(c(.packages()), file = "bib-files/packages.bib")

1 A New Journey

This journey will probably start right away with a function call from the tidyverse package (Wickham, 2023).

     

═════════════════════════════════════════════════════════════════════════
Session information for reproducibility:
Analyses were conducted using the R Statistical language (version 4.3.2; R Core
Team, 2023) on Windows 11 x64 (build 22631)
Packages used:
  - iterators (version 1.0.14; Analytics R, Weston S, 2022)
  - ggthemes (version 5.1.0; Arnold J, 2024)
  - bayesian (version 1.0.1; Badr H, Bürkner P, 2024)
  - lme4 (version 1.1.35.1; Bates D et al., 2015)
  - Matrix (version 1.6.1.1; Bates D et al., 2023)
  - effectsize (version 0.8.7; Ben-Shachar MS et al., 2020)
  - ggradar (version 0.2; Bion R, 2023)
  - brms (version 2.21.0; Bürkner P, 2017)
  - webshot (version 0.5.5; Chang W, 2023)
  - webshot2 (version 0.1.1; Chang W, 2023)
  - ggbeeswarm (version 0.7.2; Clarke E et al., 2023)
  - doParallel (version 1.0.17; Corporation M, Weston S, 2022)
  - infer (version 1.0.7; Couch SP et al., 2021)
  - ggdendro (version 0.2.0; de Vries A, Ripley BD, 2024)
  - Rcpp (version 1.0.12; Eddelbuettel D et al., 2024)
  - qgam (version 1.3.4; Fasiolo M et al., 2021)
  - mgcViz (version 0.1.11; Fasiolo et al., 2020)
  - ggpattern (version 1.0.1; FC M et al., 2022)
  - rsample (version 1.2.1; Frick H et al., 2024)
  - viridisLite (version 0.4.2; Garnier et al., 2023)
  - viridis (version 0.6.5; Garnier et al., 2024)
  - rstanarm (version 2.32.1; Goodrich B et al., 2024)
  - simr (version 1.0.7; Green P, MacLeod CJ, 2016)
  - lubridate (version 1.9.3; Grolemund G, Wickham H, 2011)
  - seriation (version 1.5.4; Hahsler M et al., 2023)
  - fs (version 1.6.3; Hester J et al., 2023)
  - camcorder (version 0.1.0; Hughes E, 2022)
  - ggpubr (version 0.6.0; Kassambara A, 2023)
  - rstatix (version 0.7.2; Kassambara A, 2023)
  - factoextra (version 1.0.7; Kassambara A, Mundt F, 2020)
  - tidybayes (version 3.0.6; Kay M, 2023)
  - ggdist (version 3.3.2; Kay M, 2024)
  - ggpointdensity (version 0.1.0; Kremer L, 2019)
  - modeldata (version 1.3.0; Kuhn M, 2024)
  - tune (version 1.2.0; Kuhn M, 2024)
  - workflowsets (version 1.1.0; Kuhn M, Couch S, 2024)
  - multilevelmod (version 1.0.0; Kuhn M, Frick H, 2022)
  - dials (version 1.2.1; Kuhn M, Frick H, 2024)
  - corrr (version 0.4.4; Kuhn M et al., 2022)
  - parsnip (version 1.2.1; Kuhn M, Vaughan D, 2024)
  - yardstick (version 1.3.1; Kuhn M et al., 2024)
  - tidymodels (version 1.2.0; Kuhn M, Wickham H, 2020)
  - recipes (version 1.0.10; Kuhn M et al., 2024)
  - FactoMineR (version 2.10; Lê S et al., 2008)
  - emmeans (version 1.10.0; Lenth R, 2024)
  - parameters (version 0.21.6; Lüdecke D et al., 2020)
  - performance (version 0.11.0; Lüdecke D et al., 2021)
  - easystats (version 0.7.1; Lüdecke D et al., 2022)
  - see (version 0.8.3; Lüdecke D et al., 2021)
  - insight (version 0.19.10; Lüdecke D et al., 2019)
  - cluster (version 2.1.6; Maechler M et al., 2023)
  - DirichletReg (version 0.7.1; Maier MJ, 2021)
  - bayestestR (version 0.13.2; Makowski D et al., 2019)
  - modelbased (version 0.8.7; Makowski D et al., 2020)
  - report (version 0.5.8; Makowski D et al., 2023)
  - correlation (version 0.8.4; Makowski D et al., 2022)
  - latex2exp (version 0.9.6; Meschiari S, 2022)
  - foreach (version 1.5.2; Microsoft, Weston S, 2022)
  - BayesFactor (version 0.9.12.4.7; Morey R, Rouder J, 2024)
  - tibble (version 3.2.1; Müller K, Wickham H, 2023)
  - rgl (version 1.3.1; Murdoch D, Adler D, 2024)
  - jsonlite (version 1.8.8; Ooms J, 2014)
  - datawizard (version 0.10.0; Patil I et al., 2022)
  - ggforce (version 0.4.2; Pedersen T, 2024)
  - patchwork (version 1.2.0; Pedersen T, 2024)
  - ambient (version 1.0.2; Pedersen T, Peck J, 2022)
  - gganimate (version 1.0.9; Pedersen T, Robinson D, 2024)
  - nlme (version 3.1.164; Pinheiro J et al., 2023)
  - coda (version 0.19.4.1; Plummer M et al., 2006)
  - showtextdb (version 3.0; Qiu Y, details. aotifSfAf, 2020)
  - sysfonts (version 0.8.9; Qiu Y, details. aotifSfAf, 2024)
  - showtext (version 0.9.7; Qiu Y, details. aotisSfAf, 2024)
  - librarian (version 1.8.1; Quintans D, 2021)
  - R (version 4.3.2; R Core Team, 2023)
  - wesanderson (version 0.3.7; Ram K, Wickham H, 2023)
  - broom (version 1.0.5; Robinson D et al., 2023)
  - hrbrthemes (version 0.8.7; Rudis B, 2024)
  - openxlsx (version 4.2.5.2; Schauberger P, Walker A, 2023)
  - GGally (version 2.2.1; Schloerke B et al., 2024)
  - holodeck (version 0.2.2; Scott E, 2023)
  - mclust (version 6.1; Scrucca L et al., 2023)
  - plotly (version 4.10.4; Sievert C, 2020)
  - gratia (version 0.9.0; Simpson G, 2024)
  - ggrepel (version 0.9.5; Slowikowski K, 2024)
  - reticulate (version 1.35.0; Ushey K et al., 2024)
  - workflows (version 1.1.4; Vaughan D, Couch S, 2024)
  - ggplot2 (version 3.5.0; Wickham H, 2016)
  - forcats (version 1.0.0; Wickham H, 2023)
  - stringr (version 1.5.1; Wickham H, 2023)
  - tidyverse (version 2.0.0; Wickham H et al., 2019)
  - readxl (version 1.4.3; Wickham H, Bryan J, 2023)
  - dplyr (version 1.1.4; Wickham H et al., 2023)
  - purrr (version 1.0.2; Wickham H, Henry L, 2023)
  - readr (version 2.1.5; Wickham H et al., 2024)
  - scales (version 1.3.0; Wickham H et al., 2023)
  - tidyr (version 1.3.1; Wickham H et al., 2024)
  - ggridges (version 0.5.6; Wilke C, 2024)
  - ggtext (version 0.1.2; Wilke C, Wiernik B, 2022)
  - mgcv (version 1.9.1; Wood SN, 2011)
  - ggsci (version 3.0.3; Xiao N, 2024)
  - knitr (version 1.45; Xie Y, 2023)
  - Formula (version 1.2.5; Zeileis A, Croissant Y, 2010)
═════════════════════════════════════════════════════════════════════════

References

Wickham, H. (2023). Tidyverse: Easily install and load the tidyverse. https://tidyverse.tidyverse.org